'''

@author: wyndem
@Emil:   wyndem@qq.com
@FileName: haobqg.py
@Time: 2019/3/13 11:42
@Software: PyCharm
@Description: 

'''
from bs4 import BeautifulSoup

from novel.utils.aio_requests import Aio


def chapter(url):
    html = Aio([url], None).send()
    bs = BeautifulSoup(html, "html.parser")
    title = bs.select('div.bookname h1')[0].get_text()
    context = bs.select('div#content')[0].get_text()
    return (title,context)

if __name__ == '__main__':
    print(chapter('http://www.haobqg.com/html/4_4472/2079201.html'))